bitkeeper revision 1.1159.20.1 (4119353fK0fKs_SYKxrgvHgZ7WbE4Q)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Tue, 10 Aug 2004 20:51:11 +0000 (20:51 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Tue, 10 Aug 2004 20:51:11 +0000 (20:51 +0000)
migration blkdev and netdev resume fixes

linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/main.c
linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c
linux-2.6.7-xen-sparse/drivers/xen/netfront/netfront.c

index 015d62c624e1ab2c4981c5461d92f12d82174a10..0d5fd969687d7c7ae5e78d3d34ce910ae0302df5 100644 (file)
@@ -805,4 +805,16 @@ void blkdev_suspend(void)
 
 void blkdev_resume(void)
 {
+    ctrl_msg_t                       cmsg;
+    blkif_fe_driver_status_changed_t st;
+    
+
+    /* Send a driver-UP notification to the domain controller. */
+    cmsg.type      = CMSG_BLKIF_FE;
+    cmsg.subtype   = CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED;
+    cmsg.length    = sizeof(blkif_fe_driver_status_changed_t);
+    st.status      = BLKIF_DRIVER_STATUS_UP;
+    memcpy(cmsg.msg, &st, sizeof(st));
+    ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE);
 }
+
index c218d199d154c4beaa54b886c684bfac81e18a60..6acd49bc0606c1e7a78521352fac9a4212c6a08b 100644 (file)
@@ -1200,6 +1200,7 @@ static void __do_suspend(void)
     /* Hmmm... a cleaner interface to suspend/resume blkdevs would be nice. */
     extern void blkdev_suspend(void);
     extern void blkdev_resume(void);
+    extern void netif_resume(void);
     
     extern void time_suspend(void);
     extern void time_resume(void);
@@ -1248,8 +1249,8 @@ static void __do_suspend(void)
 
     __sti();
 
-    //blkdev_resume();
-    //netdev_resume();
+    blkdev_resume();
+    netif_resume();
 
  out:
     if ( suspend_record != NULL )
index c85e30610ebae1760b20979e464f6f5f43725391..368feadc5513ab9edc596a67b83642593be6aeaa 100644 (file)
@@ -874,4 +874,21 @@ static int __init netif_init(void)
     return err;
 }
 
+void netif_resume(void)
+{
+    ctrl_msg_t                       cmsg;
+    netif_fe_driver_status_changed_t st;
+
+    /* Send a driver-UP notification to the domain controller. */
+    cmsg.type      = CMSG_NETIF_FE;
+    cmsg.subtype   = CMSG_NETIF_FE_DRIVER_STATUS_CHANGED;
+    cmsg.length    = sizeof(netif_fe_driver_status_changed_t);
+    st.status      = NETIF_DRIVER_STATUS_UP;
+    st.nr_interfaces = 0;
+    memcpy(cmsg.msg, &st, sizeof(st));
+    ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE);
+
+}
+
+
 __initcall(netif_init);